﻿<UserControl x:Class="TimeSplicerModule.Views.UserView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300"
             Width="700" Height="600">
    
    <Grid VerticalAlignment="Top" HorizontalAlignment="Left">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="150" />
            <ColumnDefinition Width="225" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition Height="75" />
        </Grid.RowDefinitions>

        <!-- First Name -->
        <Border Grid.Column="0" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
            <TextBlock Text="First Name:" />
        </Border>
        
        <Border Grid.Column="1" Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">            
            <TextBox Text="{Binding Path=FirstName, Mode=TwoWay}" Width="200" />
        </Border>
        
        
        <!-- Last Name -->
        <Border Grid.Column="0" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
            <TextBlock Text="Last Name:" />
        </Border>

        <Border Grid.Column="1" Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
            <TextBox Text="{Binding Path=LastName, Mode=TwoWay}" Width="200" />
        </Border>

        <!-- Login -->
        <Border Grid.Column="0" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
            <TextBlock Text="Login:" />
        </Border>

        <Border Grid.Column="1" Grid.Row="2" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
            <TextBox Text="{Binding Path=Login, Mode=TwoWay}" Width="200" />
        </Border>

        <!-- Reserved for password -->
        <Border Grid.Column="0" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
            <TextBlock Text="Password:" />
        </Border>

        <Border Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
            <TextBox Text="{Binding Path=Password, Mode=TwoWay}" Width="200" />
        </Border>

        <!-- Status -->
        <Border Grid.Column="0" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
            <TextBlock Text="Status:" />
        </Border>

        <Border Grid.Column="1" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
            <ComboBox Name="statusesComboBox" ItemsSource="{Binding Path=Statuses}" Width="200" Height="25" 
                      DisplayMemberPath="Name"
                      SelectedValuePath="StatusGuid"
                      SelectedValue="{Binding Path=StatusGuid, UpdateSourceTrigger=PropertyChanged}">
            </ComboBox>
        </Border>

        
        <!-- Team -->
        <Border Grid.Column="0" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
            <TextBlock Text="Team:" />
        </Border>

        <Border Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
            <ComboBox Name="teamsComboBox" ItemsSource="{Binding Path=Teams}" Width="200" Height="25" 
                      DisplayMemberPath="Name"
                      SelectedValuePath="TeamGuid"
                      SelectedValue="{Binding Path=TeamGuid, UpdateSourceTrigger=PropertyChanged}">
            </ComboBox>
        </Border>

        <!-- Job Role -->
        <!--<Border Grid.Column="0" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
            <TextBlock Text="Job Role:" />
        </Border>

        <Border Grid.Column="1" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
            <ComboBox Name="jobRolesComboBox" ItemsSource="{Binding Path=JobRoles}" Width="200" Height="25" 
                      DisplayMemberPath="Name"
                      SelectedValuePath="JobRoleGuid"
                      SelectedValue="{Binding Path=JobRoleGuid, UpdateSourceTrigger=PropertyChanged}">
            </ComboBox>
        </Border>-->


        <!-- Application Role  -->
        <Border Grid.Column="0" Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="5">
            <TextBlock Text="Application Role:" />
        </Border>

        <Border Grid.Column="1" Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5">
            <ComboBox Name="applicationRolesComboBox" ItemsSource="{Binding Path=ApplicationRoles}" Width="200" Height="25" 
                      DisplayMemberPath="Name"
                      SelectedValuePath="ApplicationRoleGuid"
                      SelectedValue="{Binding Path=ApplicationRoleGuid, UpdateSourceTrigger=PropertyChanged}">
            </ComboBox>
        </Border>


        <!-- Save -->
        <Border Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="2" VerticalAlignment="Center" HorizontalAlignment="Center">
            <StackPanel Orientation="Horizontal">
                <Button Name="saveButton" Content="Save" Width="100" Height="25" Click="saveButton_Click" />
                <Button Name="saveExitButton" Content="Save &amp; Exit" Width="100" Height="25" Click="saveExitButton_Click" Margin="15,0,0,0" />
                <Button Name="cancelButton" Content="Cancel" Width="100" Height="25" Click="cancelButton_Click" Margin="15,0,0,0" />
            </StackPanel>
        </Border>
    </Grid>
</UserControl>
